package j03static;

class Dog{
    static int legs = 4;

    void f1(){
        System.out.println(Dog.legs);
        System.out.println(legs);//可以
        System.out.println(this.legs);//可以
    }
    static void f2(){
        System.out.println(Dog.legs);
//        System.out.println(this.legs);
        System.out.println(legs);
    }


    int age = 7;
    static void sayAge(){
//        System.out.println(age);
        System.out.println(new Dog().age);
    }
}

public class J2 {
    public static void main(String[] args) {
        new Dog().f1();

        Dog.f2();

        ff();
        J2.ff();
    }

    public static void ff(){

    }
}
